package com.jdls.web;

import com.jdls.pojo.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 嘉德罗斯
 * @date 2021/9/18
 */
@RestController
@RequestMapping("/book")
public class BookWeb {
    @Autowired
    private Student student;
    @Value("${student.name}")
    private String name;
    @GetMapping("{id}")
    public String findById(@PathVariable int id){
        System.out.println(id);
        System.out.println(name);
        System.out.println(student);
        return "ok";
    }
}
